package ioperation;

import book.Book;
import book.BookList;

public class Show implements IOperation {
    @Override
    public void work(BookList bookList) {
        System.out.println("显示图书");
        System.out.println("书名       " + "作者          "+ "价格         "+"状态");

        for (int i = 0; i < bookList.getUsedsize(); i++) {
            Book book = bookList.getBook(i);

//            System.out.print(book.getName()+"      "+book.getAuthor()+"        "+book.getPrice());
//            if(book.isBorrewd()){
//                System.out.print("     已借出");
//            }
//            else{
//                System.out.print("     未借出");
//            }
//            System.out.println();
            System.out.println(book);
        }
    }
}
